﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Thermometer : ISensor
    {
        private int _Status;
        private string _ID;

        public int Status
        {
            get { return _Status; }
            set 
            {
                if (value < -10 || value > 50)
                {
                    Console.WriteLine("Fehler: Thermometer - Status kann nicht " + value.ToString() + " sein.");
                }
                else
                {
                    _Status = value;
                }
            }
        }

        public Thermometer(string ID)
        {
            _Status = Program.RandomNumber(0,1);
            _ID = ID;
        }

        public string ID
        {
            get { return _ID; }
        }
    }
}
